const app = getApp()
Page({
  data:{
    jifen:'',
  },
  onShow:function(res){
    var that = this
    var openid = app.globalData.userInfo.open_id;
    
      //积分
      wx.request({
        url: app.globalData.apiUrl + '/api/user/integral',
        data: { openid: openid },
        method: 'GET',
        dataType: 'json',
        success: function (res) {
          console.log(res)
          that.setData({ jifen: res.data.integral})
        },
        fail: function (res) { },
        complete: function (res) { },
      })
    }
   
  
})